package SMS.mapper;

import SMS.pojo.Students;
import SMS.vo.IStudent;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
* @author 王天宇
* @description 针对表【students】的数据库操作Mapper
* @createDate 2024-09-16 15:23:09
* @Entity generator.domain.Students
*/
@Mapper
public interface StudentsMapper {

    int deleteByPrimaryKey(Long id);

    List<IStudent> listStudents(@Param("offset") int offset, @Param("pageSize") int pageSize);


    int insert(Students record);

    int insertSelective(Students record);

    Students selectByPrimaryKey(Long id);

    int updateByPrimaryKeySelective(Students record);

    int updateByPrimaryKey(Students record);

    int getTotalCount();

    void updateByid(@Param("id") Long id,
                    @Param("stuName") String stuName,
                    @Param("stuNo") String stuNo,
                    @Param("photo") String photo,
                    @Param("gender") String gender,
                    @Param("phone") String phone,
                    @Param("email") String email,
                    @Param("address") String address,
                    @Param("classNo") String classNo,
                    @Param("selectedCorseNo") String selectedCorseNo,
                    @Param("remark") String remark);

    int countByStuNo(@Param("stuNo") String no);

    int countByStuName(@Param("stuName") String name);

    List<IStudent> searchStudentByName(@Param("stuName") String stuName, @Param("offset") int offset, @Param("pageSize") int pageSize);

    List<IStudent> searchStudentByNo(@Param("stuNo") String req, @Param("offset") int offset, @Param("pageSize") int pageSize);
}
